<template>
  <div :class="className == '鱼尾板' ? '' : 'app-container'">
    <el-form :model="queryParams" ref="queryForm" :inline="true">
      <el-form-item label="">
        <el-select
          filterable
          clearable
          style="width: 140px"
          v-model="queryParams.railwayId"
          placeholder="线名"
        >
          <el-option
            v-for="dict in railwayNamearr"
            :label="dict.railwayName"
            :value="dict.railwayId"
          ></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="">
        <el-select
          filterable
          clearable
          style="width: 140px"
          v-model="queryParams.progressTypeId"
          placeholder="上下行"
        >
          <el-option
            v-for="dict in progressTypearr"
            :label="dict.progressType"
            :value="dict.progressTypeId"
          ></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="" class="formitemcla">
        <el-input
          v-model="queryParams.mileageNumber"
          placeholder="里程"
          clearable
          style="width: 140px"
          @keyup.enter.native="handleQuery"
        >
          <template #suffix> km </template>
        </el-input>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="handleQuery" style="width: 90px"
          >查询</el-button
        >
        <el-button @click="resetQuery" style="width: 90px">重置</el-button>
        <el-button type="primary" style="width: 90px" @click="handleExport"
          >导出</el-button
        >
        <el-button type="primary" @click="handleAdd" style="width: 90px"
          >新增</el-button
        >
        <el-button @click="childValuefun" style="width: 90px">返回</el-button>
      </el-form-item>
    </el-form>

    <el-table
      v-loading="loading"
      :data="fishplateList"
      height="62vh"
      border
      @selection-change="selectiontab"
    >
      <el-table-column type="selection" label="全选" width="50" />
      <!-- <el-table-column label="单位id"  prop="unitId" /> -->
      <el-table-column label="线路" prop="railwayName" />
      <el-table-column label="上下行" prop="progressType" />
      <el-table-column label="里程" prop="mileage" />
      <!-- <el-table-column label="里程(数字版)"  prop="mileageNumber" />
      <el-table-column label="钢轨材质(属性维护id)"  prop="railMaterialId" /> -->
      <el-table-column label="鱼尾板编号" prop="fishplateCode" />
      <el-table-column label="鱼尾板类型" prop="fishplateType" />
      <el-table-column label="鱼尾板材质" prop="fishplateMaterial" />
      <el-table-column label="横截面面积" prop="sectionAcreage" />
      <el-table-column label="鱼尾板标准号" prop="standardNumber" />
      <!-- <el-table-column label="钢轨类型"  prop="railTypeId" /> -->
      <el-table-column label="鱼尾板长度" prop="fishplateLength" />
      <!-- <el-table-column label="每米重量"  prop="weightPerMeter" />
      <el-table-column label="重心至顶部的距离"  prop="gravityTopDistance" />
      <el-table-column label="重心至下部的距离"  prop="gravityBottomDistance" />
      <el-table-column label="重心至内侧的距离"  prop="gravityInsideDistance" />
      <el-table-column label="重心至外侧的距离"  prop="gravityOutsideDistance" />
      <el-table-column label="z轴水平轴夹角"  prop="zhorizontalAxisAngle" />
      <el-table-column label="中性轴与z轴夹角"  prop="neutralAxisZAngle" />
      <el-table-column label="健康值"  prop="healthIndex" />
      <el-table-column label="隐患等级"  prop="hiddenDangerLevel" />
      <el-table-column label="设备使用频率"  prop="equipmentUsageFrequency" />
      <el-table-column label="设备综合效率(OEE)"  prop="oee" />
      <el-table-column label="平均无故障工作时间(MTBF)"  prop="mtbf" />
      <el-table-column label="平均修复时间(MTTR)"  prop="mttr" />
      <el-table-column label="区段"  prop="zone" />
      <el-table-column label="工区"  prop="workArea" />
      <el-table-column label="人员"  prop="user" />
      <el-table-column label="备注"  prop="remark" /> -->
      <el-table-column label="直接数据" min-width="110">
        <template #default="scope" class="buttontext">
          <el-button link type="primary" @click="handleUpdate(scope.row)"
            >参数</el-button
          >
          <el-button link type="primary" @click="meansFun(scope.row)"
            >资料</el-button
          >
        </template>
      </el-table-column>
      <el-table-column label="关联数据" min-width="210">
        <template #default="scope" class="buttontext">
          <el-button link type="primary" @click="resumeUpdate(scope.row)"
            >作业履历</el-button
          >
          <el-button link type="primary" @click="deviceProblem(scope.row)"
            >设备问题</el-button
          >
          <el-button link type="primary" @click="businessFinance(scope.row)"
            >业财</el-button
          >
        </template>
      </el-table-column>
      <el-table-column label="操作">
        <template #default="scope">
          <!-- <el-button link type="primary" @click="handleUpdate(scope.row)">修改</el-button> -->
          <el-button link type="primary" @click="handleDelete(scope.row)"
            >删除</el-button
          >
        </template>
      </el-table-column>
    </el-table>
    <el-dialog
      draggable
      title="资料"
      v-model="meansopen"
      width="1300px"
      append-to-body
      @close="closefun"
    >
      <means :forma="formam" parentName="正线鱼尾板" v-if="meansopen"></means>
    </el-dialog>
    <!-- 添加或修改正线轨道设备-接头关联设备-鱼尾板信息对话框 -->
    <el-dialog
      :title="title"
      v-model="open"
      width="1250px"
      append-to-body
      draggable
    >
      <el-form
        ref="form"
        :model="forma"
        :rules="rules"
        label-width="100px"
        :inline="true"
      >
        <div class="divflex">
          <span class="leftx"></span>
          <span class="mainz">位置</span>
          <span class="rightx"></span>
        </div>
        <el-form-item label="单位名称" prop="unitId">
          <el-select
            filterable
            clearable
            style="width: 180px"
            v-model="forma.unitId"
            placeholder="请选择"
          >
            <el-option
              v-for="dict in unitNameobj"
              :label="dict.unitName"
              :value="dict.id"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="线名" prop="railwayId">
          <el-select
            filterable
            clearable
            style="width: 180px"
            v-model="forma.railwayId"
            placeholder="请选择"
          >
            <el-option
              v-for="dict in railwayNameobj"
              :label="dict.railwayName"
              :value="dict.id"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="上下行" prop="progressTypeId">
          <el-select
            filterable
            clearable
            style="width: 180px"
            v-model="forma.progressTypeId"
            placeholder="请选择"
          >
            <el-option
              v-for="dict in progressTypeobj"
              :label="dict.progressType"
              :value="dict.id"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="里程" prop="mileageNumber">
          <el-input
            style="width: 180px"
            type="number"
            v-model="forma.mileageNumber"
            placeholder="请输入里程"
          />
        </el-form-item>
        <!-- <el-form-item label="钢轨材质" prop="railMaterialId">
          <el-select filterable clearable style="width: 180px" v-model="forma.railMaterialId" placeholder="请选择">
            <el-option v-for="(item, index) in railMaterialobj" :key="index" :label="item.propertyName" :value="item.id"></el-option>
          </el-select>
        </el-form-item> -->
        <el-form-item label="鱼尾板编号" prop="fishplateCode">
          <el-input
            style="width: 180px"
            v-model="forma.fishplateCode"
            placeholder="请输入鱼尾板编号"
          />
        </el-form-item>
        <div class="divflex">
          <span class="leftx"></span>
          <span class="mainz">特性</span>
          <span class="rightx"></span>
        </div>
        <el-form-item label="鱼尾板类型" prop="fishplateTypeId">
          <el-select
            filterable
            clearable
            style="width: 180px"
            v-model="forma.fishplateTypeId"
            placeholder="请选择"
          >
            <el-option
              v-for="(item, index) in fishplateTypeobj"
              :key="index"
              :label="item.propertyName"
              :value="item.id"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="鱼尾板材质" prop="fishplateMaterialId">
          <el-select
            filterable
            clearable
            style="width: 180px"
            v-model="forma.fishplateMaterialId"
            placeholder="请选择"
          >
            <el-option
              v-for="(item, index) in fishplateMaterialobj"
              :key="index"
              :label="item.propertyName"
              :value="item.id"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="横截面面积" prop="sectionAcreage">
          <el-input
            style="width: 180px"
            v-model="forma.sectionAcreage"
            placeholder="请输入横截面面积"
          />
        </el-form-item>
        <el-form-item label="鱼尾板标准号" prop="standardNumber">
          <el-input
            style="width: 180px"
            v-model="forma.standardNumber"
            placeholder="请输入鱼尾板标准号"
          />
        </el-form-item>
        <el-form-item label="钢轨类型" prop="railTypeId">
          <el-select
            filterable
            clearable
            style="width: 180px"
            v-model="forma.railTypeId"
            placeholder="请选择"
          >
            <el-option
              v-for="(item, index) in railTypeobj"
              :key="index"
              :label="item.propertyName"
              :value="item.id"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="鱼尾板长度" prop="fishplateLength">
          <el-input
            style="width: 180px"
            v-model="forma.fishplateLength"
            placeholder="请输入鱼尾板长度"
          />
        </el-form-item>
        <el-form-item label="每米重量" prop="weightPerMeter">
          <el-input
            style="width: 180px"
            v-model="forma.weightPerMeter"
            placeholder="请输入每米重量"
          />
        </el-form-item>
        <el-form-item label="重心至顶部的距离" prop="gravityTopDistance">
          <el-input
            style="width: 180px"
            v-model="forma.gravityTopDistance"
            placeholder="请输入重心至顶部的距离"
          />
        </el-form-item>
        <el-form-item label="重心至下部的距离" prop="gravityBottomDistance">
          <el-input
            style="width: 180px"
            v-model="forma.gravityBottomDistance"
            placeholder="请输入重心至下部的距离"
          />
        </el-form-item>
        <el-form-item label="重心至内侧的距离" prop="gravityInsideDistance">
          <el-input
            style="width: 180px"
            v-model="forma.gravityInsideDistance"
            placeholder="请输入重心至内侧的距离"
          />
        </el-form-item>
        <el-form-item label="重心至外侧的距离" prop="gravityOutsideDistance">
          <el-input
            style="width: 180px"
            v-model="forma.gravityOutsideDistance"
            placeholder="请输入重心至外侧的距离"
          />
        </el-form-item>
        <el-form-item label="z轴水平轴夹角" prop="zhorizontalAxisAngle">
          <el-input
            style="width: 180px"
            v-model="forma.zhorizontalAxisAngle"
            placeholder="请输入z轴水平轴夹角"
          />
        </el-form-item>
        <el-form-item label="中性轴与z轴夹角" prop="neutralAxisZAngle">
          <el-input
            style="width: 180px"
            v-model="forma.neutralAxisZAngle"
            placeholder="请输入中性轴与z轴夹角"
          />
        </el-form-item>
        <div class="divflex">
          <span class="leftx"></span>
          <span class="mainz">健康度</span>
          <span class="rightx"></span>
        </div>
        <el-form-item label="健康值" prop="healthIndex">
          <el-input
            style="width: 180px"
            v-model="forma.healthIndex"
            placeholder="请输入健康值"
          />
        </el-form-item>
        <el-form-item label="隐患等级" prop="hiddenDangerLevel">
          <el-input
            style="width: 180px"
            v-model="forma.hiddenDangerLevel"
            placeholder="请输入隐患等级"
          />
        </el-form-item>
        <el-form-item label="设备使用频率" prop="equipmentUsageFrequency">
          <el-input
            style="width: 180px"
            v-model="forma.equipmentUsageFrequency"
            placeholder="请输入设备使用频率"
          />
        </el-form-item>
        <el-form-item label="设备综合效率(OEE)" prop="oee">
          <el-input
            style="width: 180px"
            v-model="forma.oee"
            placeholder="请输入设备综合效率(OEE)"
          />
        </el-form-item>
        <el-form-item label="平均无故障工作时间(MTBF)" prop="mtbf">
          <el-input
            style="width: 180px"
            v-model="forma.mtbf"
            placeholder="请输入平均无故障工作时间(MTBF)"
          />
        </el-form-item>
        <el-form-item label="平均修复时间(MTTR)" prop="mttr">
          <el-input
            style="width: 180px"
            v-model="forma.mttr"
            placeholder="请输入平均修复时间(MTTR)"
          />
        </el-form-item>
        <div class="divflex">
          <span class="leftx"></span>
          <span class="mainz">管理</span>
          <span class="rightx"></span>
        </div>
        <el-form-item label="区段" prop="zone">
          <el-input
            style="width: 180px"
            v-model="forma.zone"
            placeholder="请输入区段"
          />
        </el-form-item>
        <el-form-item label="工区" prop="workArea">
          <el-input
            style="width: 180px"
            v-model="forma.workArea"
            placeholder="请输入工区"
          />
        </el-form-item>
        <el-form-item label="人员" prop="user">
          <el-input
            style="width: 180px"
            v-model="forma.user"
            placeholder="请输入人员"
          />
        </el-form-item>
        <el-form-item label="备注">
          <el-input
            v-model="forma.remark"
            type="textarea"
            :autosize="{ minRows: 4, maxRows: 4 }"
            placeholder="请输入内容"
          ></el-input>
        </el-form-item>
      </el-form>
      <div class="divflex" v-if="title == '鱼尾板信息修改'">
        <span class="leftx"></span>
        <span class="mainz">修改历史</span>
        <span class="rightx"></span>
      </div>
      <el-table
        v-if="title == '鱼尾板信息修改'"
        :data="historyList"
        height="20vh"
        border
      >
        <el-table-column
          label="序号"
          type="index"
          min-width="80"
        ></el-table-column>
        <el-table-column
          label="指标名"
          prop="property"
          min-width="80"
        ></el-table-column>
        <el-table-column label="变更前指标值" prop="oldValue" min-width="110">
        </el-table-column>
        <el-table-column label="变更后指标值" prop="newValue" min-width="80">
        </el-table-column>
        <el-table-column label="变更时间" prop="createTime" min-width="80">
        </el-table-column>
        <el-table-column label="操作用户名" prop="user" min-width="80">
        </el-table-column>
      </el-table>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script setup name="seamless">
const props = defineProps({
  className: {
    type: String,
    default: "",
  },
  childValuefun: {
    type: Function,
    default: () => {},
  },
  forma: {
    type: Object,
    default: {},
  },
});
import {
  insertManRailFacilityFishplateapi,
  selectManRailFacilityFishplateListapi,
  editManRailFacilityFishplateapi,
  deleteManRailFacilityFishplateByIdapi,
  selectManBasicRailwayListapi,
  selectManBasicUnitListapi,
  selectManBasicprogressTypeListapi,
  selectManBasicPropertyListapi,
  selectManRailEditRecordListapi,
} from "@/api/main/api.js";
import { useContent } from "@/mixin/index.js";
const {
  meansopen,
  meansFun,
  formam,
  closefun,
  resumeUpdate,
  deviceProblem,
  businessFinance,
} = useContent();
import means from "@/components/railmodle/means.vue";
defineExpose({ getList });
const emit = defineEmits(["AttrsParentCount"]);

import { reactive, ref, toRefs } from "vue";
const { proxy } = getCurrentInstance();
const loading = ref(true);
const title = ref("鱼尾板信息新增");
const open = ref(false);
const data = reactive({
  // 基础数据-单位数据表格数据
  fishplateList: [],
  // 查询参数
  queryParams: {
    pageNum: "1",
    pageSize: "10",
    railwayId: "",
    railwayName: "",
    progressTypeId: "",
    progressType: "",
    mileageNumber: "",
  },

  progressTypeobj: [],
  railwayNameobj: [],
  unitNameobj: [],
  // 表单参数
  forma: {},
  // 表单校验
  rules: {
    unitId: [
      {
        required: true,
        message: "单位名称不能为空",
        trigger: ["blur", "change"],
      },
    ],
    railwayId: [
      {
        required: true,
        message: "线路名称不能为空",
        trigger: ["blur", "change"],
      },
    ],
    progressTypeId: [
      {
        required: true,
        message: "上下行不能为空",
        trigger: ["blur", "change"],
      },
    ],
    mileageNumber: [
      { required: true, message: "里程不能为空", trigger: ["blur", "change"] },
    ],
    fishplateCode: [
      {
        required: true,
        message: "鱼尾板编号不能为空",
        trigger: ["blur", "change"],
      },
    ],
  },
  editobj: {},
  railwayNamearr: [],
  progressTypearr: [],
  propertyList: [],
  railMaterialobj: [],
  railTypeobj: [],
  fishplateTypeobj: [],
  fishplateMaterialobj: [],
  historyList: [],
  selecttabList: [],
});
const {
  selecttabList,
  historyList,
  fishplateMaterialobj,
  railTypeobj,
  fishplateTypeobj,
  railMaterialobj,
  propertyList,
  railwayNamearr,
  progressTypearr,
  queryParams,
  forma,
  rules,
  fishplateList,
  unitNameobj,
  railwayNameobj,
  editobj,
  progressTypeobj,
} = toRefs(data);
//修改记录查询
function historyListfun() {
  selectManRailEditRecordListapi({ equipmentId: editobj.value.id }).then(
    (res) => {
      historyList.value = res.data;
    }
  );
}
function selectiontab(row) {
  selecttabList.value = row;
}
/** 导出按钮操作 */
function handleExport() {
  if (selecttabList.value.length == 0) {
    proxy.$modal.msgError("请选择设备");
    return;
  }
  const arrid = [];
  for (let i = 0; i < selecttabList.value.length; i++) {
    arrid.push(selecttabList.value[i].id);
  }
  proxy.download1(
    "facility-manage/railFacilityFishplate/exportExcel",
    arrid,
    `正线鱼尾板${new Date().getTime()}.xlsx`
  );
}
/** 查询基础数据-鱼尾板数据列表 */
const pageNumparent = ref(undefined);
const pageSizeparent = ref(undefined);
/** 查询列表 */
function getList(pageNum, pageSize) {
  loading.value = true;
  if (pageNum != undefined || pageSize != undefined) {
    pageNumparent.value = pageNum;
    pageSizeparent.value = pageSize;
    queryParams.value.pageNum = pageNum == undefined ? 1 : pageNum;
    queryParams.value.pageSize = pageSize == undefined ? 10 : pageSize;
  } else {
    queryParams.value.pageNum =
      pageNumparent.value == undefined ? "1" : pageNumparent.value;
    queryParams.value.pageSize =
      pageSizeparent.value == undefined ? "10" : pageSizeparent.value;
  }
  const obj = JSON.parse(JSON.stringify(queryParams.value));
  // obj.mileageNumber = ""
  obj.railwayId = props.forma.railwayId;
  obj.progressTypeId = props.forma.progressTypeId;
  selectManRailFacilityFishplateListapi(obj).then((res) => {
    if (res.code == 200) {
      fishplateList.value = res.data;
      const xian = {};
      railwayNamearr.value = fishplateList.value.reduce((next, item) => {
        xian[item.railwayName] == undefined
          ? (xian[item.railwayName] = true & next.push(item))
          : "";
        return next;
      }, []);
      const hang = {};
      progressTypearr.value = fishplateList.value.reduce((next, item) => {
        hang[item.progressType] == undefined
          ? (hang[item.progressType] = true & next.push(item))
          : "";
        return next;
      }, []);
      loading.value = false;
      emit("AttrsParentCount", res.count, "鱼尾板");
    }
  });
}
getList();
//重置
function resetQuery() {
  queryParams.value = {
    railwayId: "",
    railwayName: "",
    progressTypeId: "",
    progressType: "",
    mileageNumber: "",
  };
  getList();
}
/** 查询基础数据-单位数据列表 */
function getList1() {
  selectManBasicRailwayListapi({ hasDelete: 0 }).then((res) => {
    if (res.code == 200) {
      railwayNameobj.value = res.data;
    }
  });
}
getList1();
/** 查询基础数据-线名数据列表 */
function getList2() {
  selectManBasicUnitListapi({ hasDelete: 0 }).then((res) => {
    if (res.code == 200) {
      unitNameobj.value = res.data;
    }
  });
}
getList2();
/** 查询基础数据-行别数据列表 */
function getList3() {
  selectManBasicprogressTypeListapi({ hasDelete: 0 }).then((res) => {
    if (res.code == 200) {
      progressTypeobj.value = res.data;
    }
  });
}
getList3();
/** 查询基础数据-属性维护数据列表 */
function getList4() {
  selectManBasicPropertyListapi({ hasDelete: 0 }).then((res) => {
    if (res.code == 200) {
      propertyList.value = res.data;
      railMaterialobj.value = [];
      railTypeobj.value = [];
      fishplateTypeobj.value = [];
      fishplateMaterialobj.value = [];
      for (let i = 0; i < propertyList.value.length; i++) {
        if (propertyList.value[i].propertyType == "钢轨材质") {
          railMaterialobj.value.push(propertyList.value[i]);
        }
        if (propertyList.value[i].propertyType == "钢轨类型") {
          railTypeobj.value.push(propertyList.value[i]);
        }
        if (propertyList.value[i].propertyType == "鱼尾板类型") {
          fishplateTypeobj.value.push(propertyList.value[i]);
        }
        if (propertyList.value[i].propertyType == "鱼尾板材质") {
          fishplateMaterialobj.value.push(propertyList.value[i]);
        }
      }
    }
  });
}
getList4();
// 取消按钮
function cancel() {
  open.value = false;
}
/** 搜索按钮操作 */
function handleQuery() {
  getList();
}
function clear() {
  forma.value = {
    unitName: "",
    railway: "",
    progressType: "",
    fishplateType: "",
    railType: "",
    railMaterial: "",
    unitId: "",
    railwayId: "",
    progressTypeId: "",
    mileage: "",
    mileageNumber: "",
    railMaterialId: "",
    fishplateCode: "",
    fishplateTypeId: "",
    fishplateMaterial: "",
    fishplateMaterialId: "",
    sectionAcreage: "",
    standardNumber: "",
    railTypeId: "",
    fishplateLength: "",
    weightPerMeter: "",
    gravityTopDistance: "",
    gravityBottomDistance: "",
    gravityInsideDistance: "",
    gravityOutsideDistance: "",
    zhorizontalAxisAngle: "",
    neutralAxisZAngle: "",
    healthIndex: "",
    hiddenDangerLevel: "",
    equipmentUsageFrequency: "",
    oee: "",
    mtbf: "",
    mttr: "",
    zone: "",
    workArea: "",
    user: "",
    hasDelete: "",
  };
}
/** 新增按钮操作 */
function handleAdd() {
  open.value = true;
  clear();
  title.value = "鱼尾板信息新增";
}
/** 修改按钮操作 */
function handleUpdate(row) {
  title.value = "鱼尾板信息修改";
  editobj.value = JSON.parse(JSON.stringify(row));
  forma.value = JSON.parse(JSON.stringify(row));
  historyListfun();
  open.value = true;
}
/** 提交按钮 */
function submitForm() {
  proxy.$refs["form"].validate((valid) => {
    if (valid) {
      if (forma.value.id != null) {
        const newforma = JSON.parse(JSON.stringify(forma.value));
        for (const key in editobj.value) {
          for (const keya in newforma) {
            if (
              key == keya &&
              editobj.value[key] == newforma[keya] &&
              key != "id"
            ) {
              Reflect.deleteProperty(newforma, keya);
            }
          }
        }

        if (
          newforma.mileageNumber != undefined &&
          newforma.mileageNumber != null
        ) {
          newforma.mileageNumber =
            Math.round(newforma.mileageNumber * 1000000) / 1000000;
        }
        if (Object.keys(newforma).length <= 1) {
          open.value = false;
        } else {
          editManRailFacilityFishplateapi(newforma).then((res) => {
            proxy.$modal.msgSuccess("修改成功");
            open.value = false;
            getList();
          });
        }
      } else {
        forma.value.mileageNumber =
          Math.round(forma.value.mileageNumber * 1000000) / 1000000;
        insertManRailFacilityFishplateapi(forma.value).then((res) => {
          proxy.$modal.msgSuccess("新增成功");
          open.value = false;
          getList();
        });
      }
    }
  });
}
/** 删除按钮操作 */
function handleDelete(row) {
  proxy.$modal
    .confirm("是否确认删除")
    .then(function () {
      return deleteManRailFacilityFishplateByIdapi({ id: row.id });
    })
    .then(() => {
      getList();
      proxy.$modal.msgSuccess("删除成功");
    })
    .catch(() => {});
}
</script>
<style scoped lang="scss">
.el-form--inline .el-form-item.formitemcla {
  margin-right: 5px !important;
}
</style>
